<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../common/Top.jsp" %>

<div id="BackLink">
    <a href="index.jsp">返回主页面>></a>
</div>

<div class="user-register-content">
    <form action="Account" class="user-form" method="post" accept-charset="UTF-8" onreset="confirm('是否确认重置信息');">
        <div class="user-register-title">用户账号信息</div>
        <c:if test="${requestScope.accountInfo != null}">
            <div class="user-form-error">
                <i class="fa-solid fa-circle-exclamation error-icon" ></i>
                <p class="error-msg">${requestScope.accountInfo}</p>
            </div>
        </c:if>
        <div class="user-form-item">
            <input type="text" class="user-form-input" name="userid" id="userid" placeholder="修改用户名" value="${sessionScope.loginUser.userid}" autocomplete="off">
            <label for="userid" class="user-form-label">
                <i class="fa-solid fa-user"></i>
            </label>
            <p class="error-item"></p>
        </div>
        <div class="user-form-item">
            <input type="password" class="user-form-input" name="password" id="password" placeholder="输入原密码(不填则不修改)" autocomplete="off">
            <label for="password" class="user-form-label">
                <i class="fa-solid fa-lock"></i>
            </label>
            <p class="error-item"></p>
        </div>
        <div class="user-form-item">
            <input type="password" class="user-form-input" name="newpassword" id="newpassword" placeholder="输入新密码" autocomplete="off">
            <label for="newpassword" class="user-form-label">
                <i class="fa-solid fa-lock"></i>
            </label>
            <p class="error-item"></p>
        </div>
        <div class="user-form-item">
            <input type="text" class="user-form-input" name="phone" id="phone" placeholder="在此填写手机号" value="${sessionScope.loginUser.phone}" autocomplete="off">
            <label for="phone" class="user-form-label">
                <i class="fa fa-mobile" aria-hidden="true"></i>
            </label>
            <p class="error-item"></p>
        </div>
        <div class="user-form-item">
            <input type="text" class="user-form-input" name="email" id="email" placeholder="在此填写邮箱" value="${sessionScope.loginUser.email}" autocomplete="off">
            <label for="email" class="user-form-label">
                <i class="fa-solid fa-envelope"></i>
            </label>
        </div>
        <div class="user-form-item">
            <input type="text" class="user-form-input" name="address" id="address" placeholder="在此填写地址" value="${sessionScope.loginUser.address}" autocomplete="off">
            <label for="address" class="user-form-label">
                <i class="fa fa-home" aria-hidden="true"></i>
            </label>
        </div>
        <div class="user-form-item">
            <input type="reset" value="重置信息" class="user-info-form-reset">
            <input type="submit" value="保存信息" class="user-info-form-submit">
        </div>
        <script type="text/javascript" src="./js/check-account.js" charset="UTF-8"></script>
    </form>
    <div class="user-info-link">
        <a href="SignOut" class="link" onclick="return confirm('是否退出账号');">退出账号>></a>
    </div>
</div>
    <%@ include file="../common/Bottom.jsp" %>